import 'package:flutter/material.dart';

void main() {
  runApp(
    MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('你好，flutter')),
        body:const MyApp(),
      ),
    ),
  );
}



//body 中的内容单独抽离一个组件
class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const Center(
          child: Text(
            '你好，flutter,我是一个自定义组件',
            textDirection: TextDirection.ltr,
            style: TextStyle(
              color: Color.fromARGB(255, 54, 244, 209),
              // color:Color.fromARGB(244, 255, 123, 1)
              fontSize: 40,
            ),
          ),
        );
  }
}
